package de.yvert.jingle.impl.openexr;

import java.io.IOException;

public class Vector2fAttribute extends Attribute
{

public static final String TYPE = "v2f";
public static final int SIZE = 8;

private final float v0, v1;

public Vector2fAttribute(String name, float v0, float v1)
{
	super(name);
	this.v0 = v0;
	this.v1 = v1;
}

@Override
public String toString()
{ return TYPE+" \""+getName()+"\" = "+v0+" "+v1; }

@Override
public void write(ExrOutputStream out) throws IOException
{
	out.writeString(getName());
	out.writeString(TYPE);
	out.writeInt(SIZE);
	out.writeFloat(v0);
	out.writeFloat(v1);
}

}
